home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
gnu
/
othergnu
/
shlutl18.zoo
/
shlutl18
/
src
/
groups.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-17
|
540b
|
27 lines
#include <stdio.h>
#include <unistd.h>
#include <string.h>
void main(int argc, char *argv[])
{
if (argc == 1)
system("id -Gn");
else
{
int counter = 1;
while (argc > 1)
{
char buffer[208];
fprintf(stdout, "%s : ", argv[counter]);
fflush(stdout); /* otherwise, id's output will precede ours */
strcpy(buffer, "id -Gn ");
strncat(buffer, argv[counter], 200);
buffer[207] = 0x00;
system(buffer);
counter += 1;
argc -= 1;
}
}
}